import {getTimestamp,filterTimeHMS} from './time'
const User = class User{
    constructor(props){

        this.realName = props.realName;
        this.mobile = props.mobile;
        this.size = props.size;
		this.page = props.page;
    }
    getState(){
        let x = {}
        //姓名
        if(this.realName){
			x.realName = this.realName
        }
        //手机号
        if(this.mobile){
            if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.mobile)){
                return {code:'0',message:'请输入正确的手机号'}
            }else{
                x.mobile = this.mobile
            }
        }
        x.size = this.size
		x.page = this.page

		return x
    }
};

export  default User